<template>
  <div class="container">
    <!-- <el-checkbox
      :indeterminate="isIndeterminate"
      v-model="checkAll"
      @change="handleCheckAllChange"
    >{{title}}</el-checkbox>
    <div style="margin: 15px 0;"></div>
    <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange" checked >
      <el-checkbox class="el-checkbox" v-for="city in cities" :label="city.module_name" :key="city.admin_id" ></el-checkbox>
    </el-checkbox-group>-->
    <el-tree
      :data="authorityList"
      show-checkbox
      node-key="mod_id"
      :props="defaultProps"
      default-expand-all
      @check="handleCheck"
    ></el-tree>
  </div>
</template>
<script>
// const cityOptions = ["上海", "北京", "广州", "深圳"]
export default {
  props: {
    authorityList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      defaultProps: {
        children: "children",
        label: "module_name"
      }
    };
  },
  methods: {
    handleCheck(val) {
      this.$emit('sendModule_id', val)
    }
  }
};
</script>
<style lang="scss" scoped>
.el-tree {
  display: flex;
  justify-content: flex-start;
}
</style>